import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Login from '@/views/Login'
import Dashboard from '@/views/Dashboard'
import SetDetail from '@/views/dashboard/Detail'
import SetHeader from '@/views/dashboard/Header'
import SetMenubar from '@/views/dashboard/Menubar'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/dashboard',
      name: 'Dashboard',
      // component: Dashboard
      components: {
        myHeader: SetHeader,
        myMenubar: SetMenubar,
        myDetail: SetDetail
      }
    }
  ]
})
